namespace go order
include 'common.thrift'
struct Order{
	1:   i64                ID             (api.body = "id")
	2:   string             OrderNumber    (api.body = 'order_number')
	3:   common.OrderStatus Status         (api.body = 'status')
	4:   list<OrderItem>    OrderItemList  (api.body = 'order_item_list')
	5:   i64                SubmitTime     (api.body = 'submit_time')
	6:   i64                PaymentTime    (api.body = 'payment_time')
	7:   i64                DeliveryTime   (api.body = 'delivery_time')
	8:   i64                ReceiveTime    (api.body = 'receive_time')
	9:   Delivery           DeliveryInfo   (api.body = 'delivery_info')
	10:  double             TotalPrice     (api.body = 'total_price')
}

struct Delivery{
	1:  string Address  (api.body = 'address')
	2:  string name     (api.body = 'name')
	3:  string mobile   (api.body = 'mobile')
}

struct OrderItem{
	1:  string                     ProductName    (api.body = 'product_name')
	2:  string                     ProductImage   (api.body = 'product_image')
	3:  i64                        ProductNumber  (api.body = 'product_number')
	4:  double                     ProductPrice   (api.body = 'product_price')
	5:  list<OrderItemProductSpec> ProductSpec    (api.body = 'product_spec')
}

struct OrderItemProductSpec{
	1:  string Name   (api.body = 'name')
	2:  string Value  (api.body = 'value')
}

struct GetOrderInfoRequest{
	1:  i64 ID  (api.query = 'id')
}

struct GetOrderInfoResponse{
	1:  Order Data  (api.body = 'data')
}

struct GetOrderListRequest{
	1:   optional common.OrderStatus Status      (api.query = 'status')
	254:          i64                Page   = 1  (api.query = 'page')
	255:          i64                Size   = 20 (api.query = 'size')
}

struct GetOrderListResponse{
	1:    list<Order>       Data        (api.body = 'data')
	255:  common.Pagination Pagination  (api.body = 'pagination')
}

struct CreateOrderRequest{
	1:  common.CreateOrderType Type           (api.body = 'type')
	2:  i64                    ProductID      (api.body = 'product_id')
	3:  string                 SKUID          (api.body = 'sku_id')
	4:  list<i64>              CartIDs        (api.body = 'cart_ids')
	5:  i64                    ProductNumber  (api.body = 'product_number')
	6:  i64                    UserAddressID  (api.body = 'user_address_id')
	7:  common.PaymentType     PaymentType    (api.body = 'payment_type')
}

struct CreateOrderResponse{
	1:  Order Data  (api.body = 'data')
}

struct PaymentOrderRequest{
	1:  i64 ID  (api.query = 'id')
}

struct PaymentOrderResponse{

}

struct CancelOrderRequest{
	1:  i64 ID  (api.query = 'id')
}

struct CancelOrderResponse{

}

struct ConfirmReceiptOrderRequest{
	1:  i64 ID  (api.query = 'id')
}

struct ConfirmReceiptOrderResponse{

}

struct PaymentSelect{
	1:  common.PaymentType ID    (api.body = 'id')
	2:  string             Name  (api.body = 'name')
}

struct GetPaymentSelectRequest{

}

struct GetPaymentSelectResponse{
	1:  list<PaymentSelect> Data  (api.body = 'data')
}
